Optimal. Leaf size=211 \[ -\frac {\sqrt {2} (A-B+C) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{\sqrt {a} d}+\frac {2 (13 A-5 B+15 C) \sin (c+d x)}{15 d \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)}}-\frac {2 (A-5 B) \sqrt {\cos (c+d x)} \sin (c+d x)}{15 d \sqrt {a+a \sec (c+d x)}}+\frac {2 A \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{5 d \sqrt {a+a \sec (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.47, antiderivative size = 211, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {4350, 4171,
4107, 4098, 3893, 212} \begin {gather*} \frac {2 (13 A-5 B+15 C) \sin (c+d x)}{15 d \sqrt {\cos (c+d x)} \sqrt {a \sec (c+d x)+a}}-\frac {\sqrt {2} (A-B+C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x) \sqrt {\sec (c+d x)}}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d}-\frac {2 (A-5 B) \sin (c+d x) \sqrt {\cos (c+d x)}}{15 d \sqrt {a \sec (c+d x)+a}}+\frac {2 A \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 3893
Rule 4098
Rule 4107
Rule 4171
Rule 4350
Rubi steps
\begin {align*} \int \frac {\cos ^{\frac {5}{2}}(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx &=\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sec ^{\frac {5}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}} \, dx\\ &=\frac {2 A \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{5 d \sqrt {a+a \sec (c+d x)}}+\frac {\left (2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {-\frac {1}{2} a (A-5 B)+\frac {1}{2} a (4 A+5 C) \sec (c+d x)}{\sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}} \, dx}{5 a}\\ &=-\frac {2 (A-5 B) \sqrt {\cos (c+d x)} \sin (c+d x)}{15 d \sqrt {a+a \sec (c+d x)}}+\frac {2 A \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{5 d \sqrt {a+a \sec (c+d x)}}+\frac {\left (4 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\frac {1}{4} a^2 (13 A-5 B+15 C)-\frac {1}{2} a^2 (A-5 B) \sec (c+d x)}{\sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}} \, dx}{15 a^2}\\ &=\frac {2 (13 A-5 B+15 C) \sin (c+d x)}{15 d \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)}}-\frac {2 (A-5 B) \sqrt {\cos (c+d x)} \sin (c+d x)}{15 d \sqrt {a+a \sec (c+d x)}}+\frac {2 A \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{5 d \sqrt {a+a \sec (c+d x)}}-\left ((A-B+C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {\sec (c+d x)}}{\sqrt {a+a \sec (c+d x)}} \, dx\\ &=\frac {2 (13 A-5 B+15 C) \sin (c+d x)}{15 d \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)}}-\frac {2 (A-5 B) \sqrt {\cos (c+d x)} \sin (c+d x)}{15 d \sqrt {a+a \sec (c+d x)}}+\frac {2 A \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{5 d \sqrt {a+a \sec (c+d x)}}+\frac {\left (2 (A-B+C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,-\frac {a \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}\\ &=-\frac {\sqrt {2} (A-B+C) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{\sqrt {a} d}+\frac {2 (13 A-5 B+15 C) \sin (c+d x)}{15 d \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)}}-\frac {2 (A-5 B) \sqrt {\cos (c+d x)} \sin (c+d x)}{15 d \sqrt {a+a \sec (c+d x)}}+\frac {2 A \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{5 d \sqrt {a+a \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.58, size = 163, normalized size = 0.77 \begin {gather*} \frac {\cos ^{\frac {3}{2}}(c+d x) \left ((29 A-10 B+30 C-2 (A-5 B) \cos (c+d x)+3 A \cos (2 (c+d x))) \sqrt {1-\sec (c+d x)} \sec ^2(c+d x)+15 \sqrt {2} (A-B+C) \text {ArcTan}\left (\frac {\sqrt {2} \sqrt {\sec (c+d x)}}{\sqrt {1-\sec (c+d x)}}\right ) \sec ^{\frac {5}{2}}(c+d x)\right ) \sin (c+d x)}{15 d \sqrt {1-\sec (c+d x)} \sqrt {a (1+\sec (c+d x))}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.24, size = 253, normalized size = 1.20
method | result | size |
default | \(\frac {\left (\sqrt {\cos }\left (d x +c \right )\right ) \sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (15 \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, A \sin \left (d x +c \right )-6 A \left (\cos ^{3}\left (d x +c \right )\right )-15 \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, B \sin \left (d x +c \right )+15 C \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+8 A \left (\cos ^{2}\left (d x +c \right )\right )-10 B \left (\cos ^{2}\left (d x +c \right )\right )-28 A \cos \left (d x +c \right )+20 B \cos \left (d x +c \right )-30 C \cos \left (d x +c \right )+26 A -10 B +30 C \right )}{15 d a \sin \left (d x +c \right )}\) | \(253\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 774 vs.
\(2 (178) = 356\).
time = 0.70, size = 774, normalized size = 3.67 \begin {gather*} \frac {\frac {\sqrt {2} {\left (60 \, \cos \left (\frac {4}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right ) \sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) - 5 \, \cos \left (\frac {2}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right ) \sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) - 60 \, \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) \sin \left (\frac {4}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right ) + 5 \, \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) \sin \left (\frac {2}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right ) - 30 \, \log \left (\cos \left (\frac {1}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right )^{2} + \sin \left (\frac {1}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right )^{2} + 2 \, \sin \left (\frac {1}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right ) + 1\right ) + 30 \, \log \left (\cos \left (\frac {1}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right )^{2} + \sin \left (\frac {1}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right )^{2} - 2 \, \sin \left (\frac {1}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right ) + 1\right ) + 6 \, \sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) - 5 \, \sin \left (\frac {3}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right ) + 60 \, \sin \left (\frac {1}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right )\right )} A}{\sqrt {a}} + \frac {10 \, {\left (3 \, \sqrt {2} \log \left (\cos \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right )^{2} + \sin \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right )^{2} + 2 \, \sin \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right ) + 1\right ) - 3 \, \sqrt {2} \log \left (\cos \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right )^{2} + \sin \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right )^{2} - 2 \, \sin \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right ) + 1\right ) + 2 \, \sqrt {2} \sin \left (\frac {3}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right ) - 6 \, \sqrt {2} \sin \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right )\right )} B}{\sqrt {a}} - \frac {30 \, {\left (\sqrt {2} \log \left (\cos \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right )^{2} + \sin \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right )^{2} + 2 \, \sin \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right ) + 1\right ) - \sqrt {2} \log \left (\cos \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right )^{2} + \sin \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right )^{2} - 2 \, \sin \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right ) + 1\right ) - 4 \, \sqrt {2} \sin \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right )\right )} C}{\sqrt {a}}}{60 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.91, size = 378, normalized size = 1.79 \begin {gather*} \left [\frac {4 \, {\left (3 \, A \cos \left (d x + c\right )^{2} - {\left (A - 5 \, B\right )} \cos \left (d x + c\right ) + 13 \, A - 5 \, B + 15 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) + \frac {15 \, \sqrt {2} {\left ({\left (A - B + C\right )} a \cos \left (d x + c\right ) + {\left (A - B + C\right )} a\right )} \log \left (-\frac {\cos \left (d x + c\right )^{2} + \frac {2 \, \sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{\sqrt {a}} - 2 \, \cos \left (d x + c\right ) - 3}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right )}{\sqrt {a}}}{30 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}}, \frac {15 \, \sqrt {2} {\left ({\left (A - B + C\right )} a \cos \left (d x + c\right ) + {\left (A - B + C\right )} a\right )} \sqrt {-\frac {1}{a}} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {-\frac {1}{a}} \sqrt {\cos \left (d x + c\right )}}{\sin \left (d x + c\right )}\right ) + 2 \, {\left (3 \, A \cos \left (d x + c\right )^{2} - {\left (A - 5 \, B\right )} \cos \left (d x + c\right ) + 13 \, A - 5 \, B + 15 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{15 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\cos \left (c+d\,x\right )}^{5/2}\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )}{\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________